#pragma once

#include "IXFixedBuffer.h"

/**
 *  IXFileSystem Interface.
 *
 */
class ExportXSkinLib IXFileSystem : public IXBaseObj
{
    DEF_INTERFACE(IXFileSystem, _T("{BE3E80C4-A43F-4402-9D28-AA5FCBE66E82}"));
public:

    /**
     *  Load one file in XFile or real system.
     *
     *  @param szXNC    Path of the file.
     *  @param pData    Received content of the file.
     *
     */
    virtual HRESULT STDMETHODCALLTYPE   put_XNCFile(IN LPCTSTR szXNCFilePath) = 0;

    /**
     *  Load one file in XFile or real system.
     *
     *  @param szXNC    Path of the file.
     *  @param pData    Received content of the file.
     *
     */
    virtual HRESULT STDMETHODCALLTYPE   LoadFile(IN LPCTSTR szXNC, OUT IXFixedBuffer** pData) = 0;

    /**
     *  Check if one path is a valid Virtual File Path.
     *
     *  @param szXNC    Path of the file.
     *  @param pbXNC    TRUE if pbVNC is one VFP.
     *
     */
    virtual HRESULT STDMETHODCALLTYPE   IsValidXNC(IN LPCTSTR szXNC, OUT BOOL* pbXNC) = 0;

    virtual HRESULT STDMETHODCALLTYPE   ParserXNC(IN LPCTSTR szXNC, OUT BSTR* pbstrRootPath, OUT BSTR* pbstrRelativePath) = 0;

    /**
     * Whether resources are stored in exe's resource
     *
     * 
     */
    virtual void    STDMETHODCALLTYPE   put_LoadFromRes(IN BOOL bLoadFromRes) = 0;
    virtual BOOL    STDMETHODCALLTYPE   get_LoadFromRes() = 0;

    virtual BOOL    STDMETHODCALLTYPE   IsFileExists(IN LPCTSTR szFilePath) = 0;
    virtual BOOL    STDMETHODCALLTYPE   IsFolderExists(IN LPCTSTR szFolderPath) = 0;
};
